package cn.edu.scau.cmi.chenjieling.composite.safe;

import cn.edu.scau.cmi.chenjieling.composite.safe.Component;

public class Leaf implements Component{
	private String name;
	public String t = name;
	public Leaf(String name) {
		this.name = name;
	}	
	@Override
	public String printStruct(String preStr) {
		System.out.println(preStr+"-"+name);
		t = preStr+"-"+name;
		return (preStr+"-"+name);
	}

}
